import request from '@/utils/request'


export function login(data) {
  console.log(data,'0000');
  return request({
    url: '/admin/admins/login',
    method: 'post',
    data
  })
}

export function register(data) {
  return request({
    url: '/admin/admins/register',
    method: 'post',
    data

  })
}

export function getUser(data) {
  return request({
    url: '/admin/users/All',
    method: 'get',
    data

  })
}
export function serchUser(data) {
  console.log(data,"data");
  return request({
    url: '/admin/users/serch',
    method: 'post',
    data

  })
}

//查所有
export function findallshoper() {
  return request({
    url: `/admin/admins/`,
    method: 'get'
  })
}


//查所有
export function app(position,params,type,value) {
  return request({
    url: `/admin/admins/find?position=${position}`,
    method: 'get',
    params,
    type,
    value
  })
}
//删除
export function deleltes(id){
  return request({
    url:`/admin/admins/${id}`,
    method:"delete"
    
  })
}
//修改
export function revise(id,data){
  console.log(data);
  return request({
    url:`/admin/admins/update/${id}`,
    method:"put",
    data
  })
}


